<template>
	<view>
		<div class="login-bt" @click="handleLogin">handleLogin登入</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		onShow: function() {
			console.log(this)
			const eventChannel = this.getOpenerEventChannel()
			eventChannel.emit('acceptDataFromLoginPage', {data: 'test'});
			// 监听acceptDataFromHomePage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('acceptDataFromHomePage', function(data) {
				console.log('acceptDataFromHomePage', data)
			})
		},
		methods: {
			handleLogin: () => {
				console.log('handleLogin');
			}
		}
	}
</script>

<style scoped lang="less">
	.login-bt {
		text-align: center;
	}
</style>
